package com.game.server.message.proto.in;

import java.nio.ByteBuffer;
import java.nio.charset.CharacterCodingException;

import lombok.Getter;

import com.comm.ISession;

import com.game.server.message.AbstractMessage;
import com.game.server.message.IRequset;

public abstract class AbstractWeiChatReqLoginReq extends AbstractMessage implements IRequset{
	static final public int msgcode = 113;
	
	@Getter protected String unionid;
	@Getter protected String nickname;
	@Getter protected String head;
	@Getter protected Byte sex;
	@Getter protected Byte type;
	@Getter protected String version;
	@Getter protected String longitude;
	@Getter protected String latitude;
	@Getter protected String ip;
	@Getter protected String equipmentNumber;
	
	@Override
	public void DeSerialize(ByteBuffer buffer) throws CharacterCodingException {
		unionid = ReadString(buffer);
		nickname = ReadString(buffer);
		head = ReadString(buffer);
		sex = ReadByte(buffer);
		type = ReadByte(buffer);
		version = ReadString(buffer);
		longitude = ReadString(buffer);
		latitude = ReadString(buffer);
		ip = ReadString(buffer);
		equipmentNumber = ReadString(buffer);
		
	}
	
	
	@Override
	public abstract void Execute(ISession session);
}

